// router-components.js  路由 此处页面不需要权限的页面
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
import login from '../page/login/login.vue'
/*首页*/
import home from '../page/home/home.vue'
import register from '../page/register/register.vue'
import error404 from '../page/error-page/404.vue'
const routes = [{
        path: '/',
        name: '登录',
        component: login,
    },
    {
        path: '/home',
        name: '着陆',
        redirect: '/dataStatistics', //如果是首页需要重定向到 dataStatistics才是真实首页
        component: home
    },
    {
        path: '/register',
        name: '注册',
        component: register
    }
];
export default new Router({
    mode: 'hash', //hash history 
    routes: routes,
    base: __dirname,
    linkActiveClass: 'link-active'

})